/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cpal.entrenamiento.dao.impl;

import com.cpal.entrenamiento.dao.ICategoriaDAO;
import com.cpal.entrenamiento.entity.Categoria;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Omar
 */
@Repository
public class CategoriaDAO extends SqlMapClientDaoSupport implements ICategoriaDAO{

    @Override
    public List<Categoria> obtenerCategorias() throws DataAccessException {
        
        return getSqlMapClientTemplate().queryForList("buscarCategoria");
    }

    @Override
    public Categoria obtenerCategoria(Integer codigoCategoria) throws DataAccessException {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
